Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just as #1932 automerged I got some help getting a Mac.
Here is the conclusion:
VS Code runs on an emulated version of node which will return x64 or use x86 emulation for ARM devices.
os.arch() returns the architecture of the node binary, not the system architecture, so it will not report arm on an arm device.
This is why I've added the additional check below using
uname
which will report the correct architecture that's not being emulated on.uname
is a bit costly so we don't need to use it everywhere. Btw, if this command fails because someone removeduname
from their system, it will just use the existing fallback logic, which is why I've kept it in place. (Believe me, people do some weird system alterations like that...)Final note:
The .NET SDK can be not under emulation when node is. That is an important caveat, even though all installs this extension makes will be under emulation since node will be, that does not mean existing installs from other sources will be. We can deal with this by checking if the path exists, if we'd expect it to exist when looking for existing installs.